package com.ccys.db.entity;

import com.ccys.db.rely.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Table;
import java.util.Date;

/**
* Created by Mybatis Generator on 2023/12/15
*/
@Data
@ApiModel("医生排班表")
@Table(name = "tbl_doctor_appointment_setting")
@NoArgsConstructor
@AllArgsConstructor
public class TblDoctorAppointmentSetting extends BaseEntity {
    @Column(name = "doctor_id")
    private String doctorId;

    @Column(name = "parent_setting_id")
    private String parentSettingId;

    /**
     * 最小可预约时间数，如设置 1 小时，则可预约 1 小时以后的医生时间
     */
    @Column(name = "min_block_bookable")
    @ApiModelProperty("最小可预约时间数，如设置 1 小时，则可预约 1 小时以后的医生时间")
    private Integer minBlockBookable;

    /**
     * 时间单位:1minute 2hour 3day 4month
     */
    @Column(name = "min_block_bookable_unit")
    @ApiModelProperty("时间单位:1minute 2hour 3day 4month")
    private Integer minBlockBookableUnit;

    /**
     * 最大可预约时间数，如设置 1 小时，则可预约 1 小时以内的医生时间
     */
    @Column(name = "max_block_bookable")
    @ApiModelProperty("最大可预约时间数，如设置 1 小时，则可预约 1 小时以内的医生时间")
    private Integer maxBlockBookable;

    /**
     * 时间单位:1minute 2hour 3day 4month
     */
    @Column(name = "max_block_bookable_unit")
    @ApiModelProperty("时间单位:1minute 2hour 3day 4month")
    private Integer maxBlockBookableUnit;

    /**
     * 间隔时长
     */
    @Column(name = "block_interval_minute")
    @ApiModelProperty("间隔时长")
    private Integer blockIntervalMinute;

    /**
     * 每个预约时间点的缓冲时长
     */
    @Column(name = "buffer_period_minute")
    @ApiModelProperty("每个预约时间点的缓冲时长")
    private Integer bufferPeriodMinute;

    /**
     * EAP间隔时长
     */
    @Column(name = "eap_block_interval_minute")
    @ApiModelProperty("EAP间隔时长")
    private Integer eapBlockIntervalMinute;

    /**
     * EAP每个预约时间点的缓冲时长
     */
    @Column(name = "eap_buffer_period_minute")
    @ApiModelProperty("EAP每个预约时间点的缓冲时长")
    private Integer eapBufferPeriodMinute;

    /**
     * 是否在公共假日工作
     */
    @Column(name = "work_on_holiday")
    @ApiModelProperty("是否在公共假日工作")
    private Integer workOnHoliday;

    /**
     * 1 work 2 leave
     */
    @Column(name = "shift_type")
    @ApiModelProperty("1 work 2 leave")
    private Integer shiftType;

    @Column(name = "clinic_id")
    private String clinicId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @Column(name = "start_time")
    private Date startTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @Column(name = "end_time")
    private Date endTime;

    /**
     * 重复类型 0 不重复 1 每日 2 每周 3 每月(如果在有repeat排班中删除某一天，则添加一条数据设置parent_id等于当前排班，开始结束时间为被删除当天的开始结束时间；如果删除当天以后的排班，则设置repeat_end_time为当天)
     */
    @Column(name = "repeat_type")
    @ApiModelProperty("重复类型 0 不重复 1 每日 2 每周 3 每月(如果在有repeat排班中删除某一天，则添加一条数据设置parent_id等于当前排班，开始结束时间为被删除当天的开始结束时间；如果删除当天以后的排班，则设置repeat_end_time为当天)")
    private Integer repeatType;

    /**
     * 重复结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Column(name = "repeat_end_time")
    @ApiModelProperty("重复结束时间")
    private Date repeatEndTime;

    @Column(name = "for_online_consult")
    private Integer forOnlineConsult;

    @Column(name = "for_walkin_consult")
    private Integer forWalkinConsult;

    @Column(name = "for_online_appointment")
    private Integer forOnlineAppointment;

    @Column(name = "for_walkin_appointment")
    private Integer forWalkinAppointment;

    @Column(name = "for_eap_appointment")
    private Integer forEapAppointment;

    @Column(name = "for_eap_walkin_appointment")
    private Integer forEapWalkinAppointment;

    @Column(name = "for_text_based_appointment")
    private Integer forTextBasedAppointment;

    /**
     * 0 草稿（2.0废弃） 1 发布  -1 删除时间段
     */
    @ApiModelProperty("0 草稿（2.0废弃） 1 发布  -1 删除时间段")
    private Integer status;

    /**
     * 保留 Is holiday = the user can deleted the holiday to let doctor have roster appoinment on that days. user can click on the purple color box to deleted it and add new roster of the doctor 
add deleted the holiday, will add in one record in appoinemtn_setting table with status = -1 and is_holiday = 1
     */
    @Column(name = "is_holiday")
    @ApiModelProperty("保留 Is holiday = the user can deleted the holiday to let doctor have roster appoinment on that days. user can click on the purple color box to deleted it and add new roster of the doctor ,add deleted the holiday, will add in one record in appoinemtn_setting table with status = -1 and is_holiday = 1")
    private Integer isHoliday;

    @Column(name = "leave_all_day")
    private Integer leaveAllDay;
}